package com.copc.task;
import com.copc.common.service.RedisService;
import com.copc.service.CopcService;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * @Author yuanbin
 * 定时任务
 * @Date 2023/08/01
 */
@Slf4j
@Configuration
@EnableScheduling
public class CacheSchedule {

    @Resource
    private CopcService copcService;

    /**
     * 刷新一次access_token
     */
//    @Scheduled(cron = "0 0/1 * * * ?")
//    public void refreshAccessTokenCache() {
//        try {
//            copcService.refreshAccessToken();
//        } catch (Exception e) {
//            log.error("刷新access_tokenCache_error_" + e.getMessage(), e);
//        }
//    }



}
